Skip to content

Support custom potentials in Rayleigh-Ritz - #41

Merged
ohno merged 2 commits into
mainfrom
agent/support-custom-potential-rayleigh-ritz
Aug 11, 2026
Merged

Support custom potentials in Rayleigh-Ritz#41
ohno merged 2 commits into
mainfrom
agent/support-custom-potential-rayleigh-ritz

Conversation

@ohno

@ohno ohno commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • add QuadGK as a runtime dependency
  • evaluate Custom potential matrix elements for SimpleGaussianBasis with adaptive Gauss–Kronrod quadrature
  • document the new matrix-element method
  • verify custom Gaussian potentials against the existing analytical Gaussian implementation at both matrix-element and solver levels

Why

Rayleigh–Ritz previously had no element method for Custom, so Hamiltonians containing user-defined central potentials failed during matrix construction. This adds a general numerical fallback for those matrix elements.

Impact

Users can now pass Custom(f = r -> ...) potentials to the Rayleigh–Ritz solver when using SimpleGaussianBasis.

Validation

  • git diff --check passed
  • Project.toml parsed successfully

This pull request was developed with assistance from Codex using GPT-5.6 Sol with High reasoning effort.

@ohno
ohno marked this pull request as ready for review August 11, 2026 11:43
@ohno
ohno merged commit d8ef5b4 into main Aug 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant